﻿using System;
using System.Collections.Generic;
using Faz.SideWinderSC.Logic;

namespace Faz.SideWinderSC.Client.ViewModel
{
    /// <summary>
    /// Defines the view-model that manages the edition of a mapping.
    /// </summary>
    public class MappingViewModel : AbstractViewModel
    {
        /// <summary>
        /// Gets or sets the name of the mapping.
        /// </summary>
        public string Name
        {
            get { return this.GetValue<string>("Name"); }
            set { this.SetValue("Name", value); }
        }

        /// <summary>
        /// Gets of sets a value indicating whether the associated button is pressed.
        /// </summary>
        public bool IsDown
        {
            get { return this.GetValue<bool>("IsDown"); }
            set { this.SetValue("IsDown", value); }
        }

        /// <summary>
        /// Gets of sets the associated button.
        /// </summary>
        public SwscButton Button
        {
            get { return this.GetValue<SwscButton>("Button"); }
            set { this.SetValue("Button", value); }
        }

        /// <summary>
        /// Gets of sets the associated keyboard keys - if any.
        /// </summary>
        public ICollection<ConsoleKey> Keys
        {
            get { return this.GetValue<ICollection<ConsoleKey>>("Keys"); }
            set { this.SetValue("Keys", value); }
        }
    }
}
